<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>商品编辑</h1>
<form action="/product/saveOrUpdate" method="POST">
	<input type="hidden" name="id" value="${product.id}">
	商品名称:<input type="text" name="name" value="${product.name}"><br>
	商品价格:<input type="text" name="price" value="${product.price}"><br>
	商品品牌:
	<select name="brand.id">
		<option>---请选择---</option>
		<c:forEach items="${brands}" var="brand">
		    <option value="${brand.id}" ${product.brand.id==brand.id?"selected":""}>
				${brand.name}
			</option>
       </c:forEach>
    </select><br>
	<input type="submit" value="提交">
</form>
</body>
</html>